import request from '@/utils/request'
import { get, post } from "@/utils/request";
const BASE_URL = window.baseUrl
// 查询字典类型列表
export function listType(query) {
  return post(BASE_URL + '/system/dictType/list', query)

}
export function listAll() {
  return get(BASE_URL + '/system/dictType/listAll')
}

// 查询字典类型详细
export function getType(id) {
  return get(BASE_URL + '/system/dictType/detail/' + id)
}

// 新增字典类型
export function addType(data) {
  return post(BASE_URL + '/system/dictType/add', data)

}

// 修改字典类型
export function updateType(data) {
  return post(BASE_URL + '/system/dictType/update', data)

}

// 删除字典类型
export function delType(dictId) {
  return post(BASE_URL + '/system/dictType/delete/' + dictId)

}

// 刷新字典缓存
export function refreshCache() {
  return get(BASE_URL + '/system/dictType/refreshCache')

}

// 获取字典选择框列表
export function optionselect() {
  return request({
    url: BASE_URL + '/system/dict/type/optionselect',
    method: 'get'
  })
}

